<%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<% 
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>大连开发区健身中心</title>
		<link type="text/css" rel="stylesheet" href="<%=path %>/admin/styles/default.css" />
		<script type="text/javascript" src="<%=path %>/res/js/jquery.js"></script>
		<script type="text/javascript" src="<%=path %>/res/js/common.js"></script>
		<script type="text/javascript" src="<%=path %>/admin/pages/portlet/js/portlet.js"></script>
	</head>
	<body>
		<form name="form1" method="post" action="<%=path %>/admin/portlet!change.action">
		<input type="hidden" id="message" value="${message}"/>
		<input type="hidden" id="webPath" value="<%=path %>"/>
		<input type="hidden" id="themeId" name="themeId" value="<s:property value="themeId"/>"/>
		<input type="hidden" id="layout" value="<s:property value="layout"/>"/>
		<table id="table-data-outter">
			<tr>
				<td>
					<table id="table-data-inner" class="table_l" cellspacing="1" border="0">
						<tr id="tr-menu-path">
							<td colspan="11" nowrap="nowrap">
								<fieldset id="f-menu-path">
									当前位置:&nbsp;模板管理 &gt; 设置首页左侧模块
									<a href="javascript:addPortlet('l')" style="margin-left:50px;">增加左侧模块</a>
								</fieldset>
								<fieldset id="f-condition-display">
										<img src="<%=path%>/admin/images/main/display_on.gif" onclick="displayCondition(this,'tr-menu-path')" 
											align="bottom" width="17" height="15" alt="隐藏查询条件" /></fieldset>
							</td>
						</tr>
						<s:if test='resultList != null && resultList.size() > 0'>
						<s:iterator value="resultList" status="index">
						<s:if test='portletPosition == "l"'>
						<tr id="tr-condition-l">
							<td width="8%" class="field-title">选择栏目: </td>
							<td width="10%" class="field-content">
								<select name="msgType" style="width:80px;" onchange="changePortlet(this)">
									<option value="">请选择</option>
									<s:iterator value="typeList" status="index">
									<option value="<s:property value="menuId"/>"
									<s:if test='msgTypeId == menuId'>selected="selected"</s:if>>
										<s:property value="menuName"/>
									</option>
									</s:iterator>
									<option value="-1" <s:if test='msgTypeId == "-1"'>selected="selected"</s:if>>友情链接</option>
									<option value="-2" <s:if test='msgTypeId == "-2"'>selected="selected"</s:if>>系统菜单</option>
									<!--<option value="-3" <s:if test='msgTypeId == "-3"'>selected="selected"</s:if>>领导介绍</option>-->
								</select>
								<input name="portlet" class="portlet" type="hidden" value=""/>
								<input type="hidden" value="l"/>
								<input type="hidden" value="<s:property value="msgTypeId"/>"/>
							</td>
							<td width="5%" class="field-title">标题: </td>
							<td width="10%" class="field-content">
								<input type="text"  value="<s:property value="portletTitle"/>" style="width:70px;"/>
							</td>
							<td width="10%" class="field-title">显示标题: </td>
							<td width="2%" class="field-content">
								<input type="checkbox"  value="1" <s:if test='displayTitle == "1"'>checked="checked"</s:if>/>
							</td>
							<td width="10%" class="field-title">选择类型: </td>
							<td width="5%" class="field-content">
								<select name="portletType" style="width:80px;" <s:if test='msgTypeId == "-1" || msgTypeId == "-2" ||msgTypeId == "-3" '>disabled</s:if> onchange="changePortletType(this)">
									<option value="textNews" <s:if test='portletType == "textNews"'>selected="selected"</s:if>>纯文本类型</option>
									<option value="picNews" <s:if test='portletType == "picNews"'>selected="selected"</s:if>>图片轮播类型</option>
									<option value="ptNews" <s:if test='portletType == "ptNews"'>selected="selected"</s:if>>图文类型</option>
									<option value="spNews" <s:if test='portletType == "spNews"'>selected="selected"</s:if>>特殊标题类型</option>
									<option value="ftNews" <s:if test='portletType == "ftNews"'>selected="selected"</s:if>>介绍类型</option>
									<option value="custom" <s:if test='portletType == "custom"'>selected="selected"</s:if>>自定义类型</option>
								</select>
							</td>
							<td width="10%" class="field-title">模块路径: </td>
							<td width="17%" class="field-content">
								<input type="text"  value="<s:property value="portletPath"/>" style="width:100px;"/>
								<span class="font_red">*</span>
							</td>
							<td width="10%" align="right" class="field-title">
								<a href="javascript:void(0);" onclick="delPortlet(this)">删除</a>
							</td>
						</tr>
						</s:if>
						</s:iterator>
						</s:if>
						<s:else>
						<tr id="tr-condition-l">
							<td width="8%" class="field-title">选择栏目: </td>
							<td width="10%" class="field-content">
								<select name="msgType" style="width:80px;" onchange="changePortlet(this)">
									<option value="">请选择</option>
									<s:iterator value="typeList" status="index">
									<option value="<s:property value="menuId"/>">
										<s:property value="menuName"/>
									</option>
									</s:iterator>
									<option value="-1">友情链接</option>
									<option value="-2">政务公开</option>
									<option value="-3">领导介绍</option>
								</select>
								<input name="portlet" class="portlet" type="hidden" value=""/>
								<input type="hidden" value="l"/>
								<input type="hidden" value=""/>
							</td>
							<td width="5%" class="field-title">标题: </td>
							<td width="10%" class="field-content">
								<input type="text"  value="" style="width:70px;"/>
							</td>
							<td width="10%" class="field-title">是否显示标题: </td>
							<td width="2%" class="field-content">
								<input type="checkbox"  value="1" checked="checked"/>
							</td>
							<td width="10%" class="field-title">选择类型: </td>
							<td width="5%" class="field-content">
								<select name="portletType" style="width:80px;"  onchange="changePortletType(this)">
									<option value="textNews">纯文本类型</option>
									<option value="picNews">图片轮播类型</option>
									<option value="ptNews">图文类型</option>
									<option value="spNews">特殊标题类型</option>
									<option value="ftNews">介绍类型</option>
									<option value="custom">自定义类型</option>
								</select>
							</td>
							<td width="10%" class="field-title">模块路径: </td>
							<td width="17%" class="field-content">
								<input type="text"  value="" style="width:100px;"/>
								<span class="font_red">*</span>
							</td>
							<td width="20%" align="right" class="field-title">
								<a href="javascript:void(0);" onclick="delPortlet(this)">删除</a>
							</td>
						</tr>
						</s:else>
					</table>
					<br />
					
					<s:if test='layout == "layout1"'>
					<table id="table-data-inner" class="table_c" cellspacing="1">
						<tr id="tr-menu-path">
							<td colspan="11" nowrap="nowrap">
								<fieldset id="f-menu-path">
									当前位置:&nbsp;模板管理 &gt; 设置首页中间模块
									<a href="javascript:addPortlet('c')" style="margin-left:50px;">增加中间模块</a>
								</fieldset>
								<fieldset id="f-condition-display">
										<img src="<%=path%>/admin/images/main/display_on.gif" onclick="displayCondition(this,'tr-menu-path')" 
											align="bottom" width="17" height="15" alt="隐藏查询条件" /></fieldset>
							</td>
						</tr>
						<s:if test='resultList != null && resultList.size() > 0'>
						<s:iterator value="resultList" status="index">
						<s:if test='portletPosition == "c"'>
						<tr id="tr-condition-c">
							<td width="8%" class="field-title">选择栏目: </td>
							<td width="10%" class="field-content">
								<select name="msgType" style="width:80px;" onchange="changePortlet(this)">
									<option value="">请选择</option>
									<s:iterator value="typeList" status="index">
									<option value="<s:property value="menuId"/>"
									<s:if test='msgTypeId == menuId'>selected="selected"</s:if>>
										<s:property value="menuName"/>
									</option>
									</s:iterator>
									<option value="-1" <s:if test='msgTypeId == "-1"'>selected="selected"</s:if>>友情链接</option>
									<option value="-2" <s:if test='msgTypeId == "-2"'>selected="selected"</s:if>>政务公开</option>
									<option value="-3" <s:if test='msgTypeId == "-3"'>selected="selected"</s:if>>领导介绍</option>
								</select>
								<input name="portlet" class="portlet" type="hidden" value=""/>
								<input type="hidden" value="c"/>
								<input type="hidden" value="<s:property value="msgTypeId"/>"/>
							</td>
							<td width="5%" class="field-title">标题: </td>
							<td width="10%" class="field-content">
								<input type="text"  value="<s:property value="portletTitle"/>" style="width:70px;"/>
							</td>
							<td width="10%" class="field-title">显示标题: </td>
							<td width="2%" class="field-content">
								<input type="checkbox"  value="1" <s:if test='displayTitle == "1"'>checked="checked"</s:if>/>
							</td>
							<td width="10%" class="field-title">选择类型: </td>
							<td width="5%" class="field-content">
								<select name="portletType" style="width:80px;" <s:if test='msgTypeId == "-1" || msgTypeId == "-2" ||msgTypeId == "-3" '>disabled</s:if> onchange="changePortletType(this)">
									<option value="textNews" <s:if test='portletType == "textNews"'>selected="selected"</s:if>>纯文本类型</option>
									<option value="picNews" <s:if test='portletType == "picNews"'>selected="selected"</s:if>>图片轮播类型</option>
									<option value="ptNews" <s:if test='portletType == "ptNews"'>selected="selected"</s:if>>图文类型</option>
									<option value="spNews" <s:if test='portletType == "spNews"'>selected="selected"</s:if>>特殊标题类型</option>
									<option value="ftNews" <s:if test='portletType == "ftNews"'>selected="selected"</s:if>>介绍类型</option>
									<option value="custom" <s:if test='portletType == "custom"'>selected="selected"</s:if>>自定义类型</option>
								</select>
							</td>
							<td width="10%" class="field-title">模块路径: </td>
							<td width="17%" class="field-content">
								<input type="text"  value="<s:property value="portletPath"/>" style="width:100px;"/>
								<span class="font_red">*</span>
							</td>
							<td width="10%" align="right" class="field-title">
								<a href="javascript:void(0);" onclick="delPortlet(this)">删除</a>
							</td>
						</tr>
						</s:if>
						</s:iterator>
						</s:if>
						<s:else>
						<tr id="tr-condition-c">
							<td width="8%" class="field-title">选择栏目: </td>
							<td width="10%" class="field-content">
								<select name="msgType" style="width:80px;" onchange="changePortlet(this)">
									<option value="">请选择</option>
									<s:iterator value="typeList" status="index">
									<option value="<s:property value="menuId"/>">
										<s:property value="menuName"/>
									</option>
									</s:iterator>
									<option value="-1">友情链接</option>
									<option value="-2">政务公开</option>
									<option value="-3">领导介绍</option>
								</select>
								<input name="portlet" class="portlet" type="hidden" value=""/>
								<input type="hidden" value="c"/>
								<input type="hidden" value=""/>
							</td>
							<td width="5%" class="field-title">标题: </td>
							<td width="10%" class="field-content">
								<input type="text"  value="" style="width:70px;"/>
							</td>
							<td width="10%" class="field-title">是否显示标题: </td>
							<td width="2%" class="field-content">
								<input type="checkbox"  value="1" checked="checked"/>
							</td>
							<td width="10%" class="field-title">选择类型: </td>
							<td width="5%" class="field-content">
								<select name="portletType" style="width:80px;" onchange="changePortletType(this)">
									<option value="textNews">纯文本类型</option>
									<option value="picNews">图片轮播类型</option>
									<option value="ptNews">图文类型</option>
									<option value="spNews">特殊标题类型</option>
									<option value="ftNews">介绍类型</option>
									<option value="custom">自定义类型</option>
								</select>
							</td>
							<td width="10%" class="field-title">模块路径: </td>
							<td width="17%" class="field-content">
								<input type="text"  value="" style="width:100px;"/>
								<span class="font_red">*</span>
							</td>
							<td width="20%" align="right" class="field-title">
								<a href="javascript:void(0);" onclick="delPortlet(this)">删除</a>
							</td>
						</tr>
						</s:else>
					</table>
					<br />
					</s:if>
					
					<table id="table-data-inner" class="table_r" cellspacing="1">
						<tr id="tr-menu-path">
							<td colspan="11" nowrap="nowrap">
								<fieldset id="f-menu-path">
									当前位置:&nbsp;模板管理 &gt; 设置首页右侧模块
									<a href="javascript:addPortlet('r')" style="margin-left:50px;">增加右侧模块</a>
								</fieldset>
								<fieldset id="f-condition-display">
										<img src="<%=path%>/admin/images/main/display_on.gif" onclick="displayCondition(this,'tr-menu-path')" 
											align="bottom" width="17" height="15" alt="隐藏查询条件" /></fieldset>
							</td>
						</tr>
						<s:if test='resultList != null && resultList.size() > 0'>
						<s:iterator value="resultList" status="index">
						<s:if test='portletPosition == "r"'>
						<tr id="tr-condition-r">
							<td width="8%" class="field-title">选择栏目: </td>
							<td width="10%" class="field-content">
								<select name="msgType" style="width:80px;" onchange="changePortlet(this)">
									<option value="">请选择</option>
									<s:iterator value="typeList" status="index">
									<option value="<s:property value="menuId"/>"
									<s:if test='msgTypeId == menuId'>selected="selected"</s:if>>
										<s:property value="menuName"/>
									</option>
									</s:iterator>
									<option value="-1" <s:if test='msgTypeId == "-1"'>selected="selected"</s:if>>友情链接</option>
									<option value="-2" <s:if test='msgTypeId == "-2"'>selected="selected"</s:if>>政务公开</option>
									<option value="-3" <s:if test='msgTypeId == "-3"'>selected="selected"</s:if>>领导介绍</option>
								</select>
								<input name="portlet" class="portlet" type="hidden" value=""/>
								<input type="hidden" value="r"/>
								<input type="hidden" value="<s:property value="msgTypeId"/>"/>
							</td>
							<td width="5%" class="field-title">标题: </td>
							<td width="10%" class="field-content">
								<input type="text"  value="<s:property value="portletTitle"/>" style="width:70px;"/>
							</td>
							<td width="10%" class="field-title">显示标题: </td>
							<td width="2%" class="field-content">
								<input type="checkbox"  value="1" <s:if test='displayTitle == "1"'>checked="checked"</s:if>/>
							</td>
							<td width="10%" class="field-title">选择类型: </td>
							<td width="5%" class="field-content">
								<select name="portletType" style="width:80px;" <s:if test='msgTypeId == "-1" || msgTypeId == "-2" ||msgTypeId == "-3" '>disabled</s:if> onchange="changePortletType(this)">
									<option value="textNews" <s:if test='portletType == "textNews"'>selected="selected"</s:if>>纯文本类型</option>
									<option value="picNews" <s:if test='portletType == "picNews"'>selected="selected"</s:if>>图片轮播类型</option>
									<option value="ptNews" <s:if test='portletType == "ptNews"'>selected="selected"</s:if>>图文类型</option>
									<option value="spNews" <s:if test='portletType == "spNews"'>selected="selected"</s:if>>特殊标题类型</option>
									<option value="ftNews" <s:if test='portletType == "ftNews"'>selected="selected"</s:if>>介绍类型</option>
									<option value="custom" <s:if test='portletType == "custom"'>selected="selected"</s:if>>自定义类型</option>
								</select>
							</td>
							<td width="10%" class="field-title">模块路径: </td>
							<td width="17%" class="field-content">
								<input type="text"  value="<s:property value="portletPath"/>" style="width:100px;"/>
								<span class="font_red">*</span>
							</td>
							<td width="10%" align="right" class="field-title">
								<a href="javascript:void(0);" onclick="delPortlet(this)">删除</a>
							</td>
						</tr>
						</s:if>
						</s:iterator>
						</s:if>
						<s:else>
						<tr id="tr-condition-r">
							<td width="8%" class="field-title">选择栏目: </td>
							<td width="10%" class="field-content">
								<select name="msgType" style="width:80px;" onchange="changePortlet(this)">
									<option value="">请选择</option>
									<s:iterator value="typeList" status="index">
									<option value="<s:property value="menuId"/>">
										<s:property value="menuName"/>
									</option>
									</s:iterator>
									<option value="-1">友情链接</option>
									<option value="-2">政务公开</option>
									<option value="-3">领导介绍</option>
								</select>
								<input name="portlet" class="portlet" type="hidden" value=""/>
								<input type="hidden" value="r"/>
								<input type="hidden" value=""/>
							</td>
							<td width="5%" class="field-title">标题: </td>
							<td width="10%" class="field-content">
								<input type="text"  value="" style="width:70px;"/>
							</td>
							<td width="10%" class="field-title">是否显示标题: </td>
							<td width="2%" class="field-content">
								<input type="checkbox"  value="1" checked="checked"/>
							</td>
							<td width="10%" class="field-title">选择类型: </td>
							<td width="5%" class="field-content">
								<select name="portletType" style="width:80px;"  onchange="changePortletType(this)">
									<option value="textNews">纯文本类型</option>
									<option value="picNews">图片轮播类型</option>
									<option value="ptNews">图文类型</option>
									<option value="spNews">特殊标题类型</option>
									<option value="ftNews">介绍类型</option>
									<option value="custom">自定义类型</option>
								</select>
							</td>
							<td width="10%" class="field-title">模块路径: </td>
							<td width="17%" class="field-content">
								<input type="text"  value="" style="width:100px;"/>
								<span class="font_red">*</span>
							</td>
							<td width="20%" align="right" class="field-title">
								<a href="javascript:void(0);" onclick="delPortlet(this)">删除</a>
							</td>
						</tr>
						</s:else>
					</table>
					
					<div id="div-button" align="center">
						<input type="button" value="保　存 " onclick="submitPortlet()"/>
						<input type="button" value="取　消" onclick="goBack();" style="margin-left:10px;"/>
					</div>
				</td>
			</tr>
		</table>
		</form>
	</body>
</html>